package StudyCode.summary.myfile;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class TransferIsAscii {

	private static boolean isAscii(String s) {
		for (int i = 0; i < s.length(); i++) {
			if (!isAscii(s.charAt(i))) {
				return false;
			}
		}
		return true;
	}


	private static boolean isAscii(int ch) {
		if (ch == '\r' || ch == '\n' || ch == '\t') {
			return true;
		}

		return ch < 127 && ch >= 32;
	}
}
